package org.jix.gbook.note.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.jix.framework.common.exception.BaseExceptionInterface;

/**
 * @author stark
 * @date 2025/6/8 14:06
 * @description 自定义响应异常码
 **/
@AllArgsConstructor
@Getter
public enum ResponseCodeEnum implements BaseExceptionInterface {

    // ----------- 通用异常状态码 -----------
    SYSTEM_ERROR("USER-10000", "网络异常，请检查网络配置......"),
    PARAM_NOT_VALID("USER-10001", "参数错误"),


    // ----------- 业务异常状态码 -----------
    NOTE_TYPE_ERROR("NOTE-20000","未知笔记类型"),
    NOTE_PUBLISH_FAIL("NOTE-20001","笔记发布失败"),
    NOTE_NOT_FOUND("NOTE-20002", "笔记不存在"),
    NOTE_PRIVATE("NOTE-20003", "作者已将该笔记设置为仅自己可见"),
    NOTE_UPDATE_FAIL("NOTE-20004", "笔记更新失败"),
    TOPIC_NOT_FOUND("NOTE-20005","话题未找到"),
    NOTE_CANT_VISIBLE_ONLY_ME("NOTE-20006", "此笔记无法修改为仅自己可见"),
    NOTE_CANT_OPERATE("NOTE-20007", "您无法操作该笔记"),
    ;

    // 异常码
    private final String errorCode;
    // 错误信息
    private final String errorMessage;
}
